package com.designpatterns.Balking;

/**
 * Created by 41579 on 2017/6/2.
 */
public class ChangerThread implements Runnable {
    Data data;
    public ChangerThread(Data data) {
        this.data = data;
    }

    @Override
    public void run() {
        for (int i=0;true;i++) {
            data.change(data.getContent()+ " " + Thread.currentThread().getName()+i);
        }
    }
}
